package com.sunchen.asc.service.item.domain;

import com.sunchen.asc.service.item.vo.ItemVo;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;

@Entity
@Table
@GenericGenerator(name="snowFlow",strategy = "com.sunchen.asc.service.data.SnowflowID")
@Data
/**
 * 事项
 */
public class Item {

    @Id
    @GeneratedValue(generator = "snowFlow")
    private Long id;
    //事项编码
    private String code;

    private String name;

    private Long parentId;

    //0无 1有
    private int hasChild;
    //实施编码
    private String workCode;
    //行使层级
    private String level;
    //设定依据
    private String basis;
    //权力来源
    private String power;
    //子事项数量
    private int childCount;

    //主题id
    private Long titleId;
    //主题类型（1：个人，2：法人）
    private int titleType;

    //受理主体
    private Long acceptDeptId;
    private String acceptDeptName;

    //是否必须来大厅办理（0：否1：是）
    private int toFace;
    //是否收费（0：否1：是）
    private int chargeFlag;
    //服务对象
    private String serviceObject;
    //生命周期
    private String lifeCycle;
    //事项类型
    private String itemType;
    //办理地点
    private Long addressId;
    //能否网上办理(0否，1是)
    private int onlineFlag;

    private int deleteFlag;

    //1:发布 2：不发布
    private int status;

    //事项标记
    private int itemMark;

    @CreationTimestamp
    private Timestamp createTime;
    private String createUser;
    private Timestamp deleteTime;
    private String deleteUser;
    @UpdateTimestamp
    private Timestamp updateTime;
    private String updateUser;

}
